In data stream ensemble classification, to make the classifiers adapt to the constantly changing data stream and adjust the weights of base classifiers to select an appropriate set of classifiers, an ensemble classification algorithm based on dynamic weighting function was proposed. Firstly, a new weighting function was proposed to adjust the weights of the base classifiers, and the classifiers were trained with constantly updated data blocks. Then a weight function was used to make a reasonable selection of candidate classifiers. Finally, the incremental nature of decision tree was applied to the base classifiers, and the classification of data stream was realized. Through a large amount of experiments, it is found that the performance of the proposed algorithm is not affected by block size. Compared with AUE2 algorithm, the average number of leaves is reduced by 681.3, the average number of nodes is reduced by 1 192.8, and the average depth of the tree is reduced by 4.42. At the same time, the accuracy is relatively improved and the time-consuming is reduced. Experimental results show that the algorithm can not only guarantee the accuracy but also save a lot of memory and time when classifying data stream.